import { JSONMapping } from "../json-mapping";
import { UserDto } from "../dto/user.dto";
// import {Bill} from "../bill/bill";
import {ObjectDto, ObjectDtoInterface} from "../../services/sqliteDB/object.dto";
import {SyncStatus} from "../sync-status";

export class Device extends JSONMapping implements ObjectDtoInterface {
    static PropertyKeyToJSONKeyMap() {
        return { id: "id|sealDeviceID",
                  name: "name|sealDeviceName",
                  type: "type|sealDeviceType",
                  componentId: "componentId|componentID"
        };
    }

    public id: string = null; // 设备id
    public name: string = null; // 设备名
    public type: string = null; // 设备类型
    public componentId: string = null; // 设备位置Id
    public componentName: string = null; // 设备位置名称
    public syncStatus: SyncStatus = SyncStatus.None;
    // bills: Array<Bill> = [];


    constructor(json: { [key: string]: any }) {
        super(json);
        Device.mapFromJSON(json, this);
    }
}

